import request from '@/utils/request'

export default {
    addCourseInfo(courseInfo) {
        return request({
            url: `/eduservice/course/addCourseInfo`,
            method: 'post',
            data: courseInfo
        })
    },
    getTeacherList() {
        return request({
            url: `/eduservice/teacher/findAll`,
            method: 'get'
        })
    },
    getCourseInfoById(courseId){
        return request({
            url: `/eduservice/course/getCourseInfo/`+courseId,
            method: 'get'
        })
    },
    updateCourseInfo(courseInfo){
        return request({
            url: `/eduservice/course/updateCourseInfo`,
            method: 'post',
            data: courseInfo
        })
    },
    //课程确认信息显示
    getPublishCourseInfo(id){
        return request({
            url: `/eduservice/course/getPublishCourseInfo/`+id,
            method: 'get'
        })
    },
    publishCourse(id) {
        return request({
            url: `/eduservice/course/publishCourse/` + id,
            method: 'post'
        })
    },
    getCourseList(current, size, courseQuery){
        return request({
            url: `/eduservice/course/pageListCourseCondition/${current}/${size}`,
            method: 'post',
            data: courseQuery
        })
    },
    deleteById(id){
        return request({
            url: `/eduservice/course/deleteCourse/${id}`,
            method: 'delete'
        })
    }
}
